/**
 * 公司：xxx有限公司
 * 版权：xxx2020
 * 描述：基于primeNG的Table组件样式表
 * 作者：oyjl
 * 时间：2020-03-05 12:40:54
 */

// 表格最小宽度，最大宽度定义
$tb-min-width: 560px;
$tb-max-width: 1920px;

// 表格上部样式，主要是数据展示块
.tb-top {
  min-width: $tb-min-width;
  max-width: $tb-max-width;
}

// 无数据图片提示
.tb-full-data {
  text-align: center;
  background: #fff;
  color: #2d353c;
  height: calc(100vh - 420px);
  img {
    margin: 16px;
  }
  strong {
    font-size: 1.2rem;
    letter-spacing: 4px;
  }
}

// 表格下部样式，主要是分页模块
.tb-bottom {
  min-width: $tb-min-width;
  max-width: $tb-max-width;
}

// 表格分页中间位置控制
.tb-paginator-both {
  position: relative;
  width: 100%;
  top: 0;
}

// 表格分页系统页面底部控制
.tb-paginator-bottom {
  position: absolute;
  width: 100%;
  bottom: 2px;
}

.tb-page-total {
  position: absolute;
  top: 10px;
  left: 16px;
  color: #000;
}

.tb-page-change {
  position: absolute;
  right: 16px;
  top: 6px;
  color: #000;
}

.tb-page-input {
  width: 45px;
  height: 24px;
}

// 表格操作项样式
.tb-operator-content {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
}

// 表格操作项样式
.tb-operator-element {
  color: #007fa9;
  cursor: pointer;
}
// 选中行字体颜色
.ui-state-highlight .tb-operator-element {
  color: #fff;
}

// 表格等待动画
.tb-wait-animate {
  background: #fff;
  height: calc(100vh - 235px);
  span {
    color: #2d353c;
  }
}

.paging-bottom-place {
  height: 20px;
  visibility: hidden;
}

// 修改primeNG表格样式
:host ::ng-deep {
  th,
  tr,
  th td,
  tr td {
    border: 0 !important;
    text-align: center !important;
    word-break: break-all;
    height: 36px;
  }
  .ui-inputswitch {
    background-color: #ddd !important;
    border-radius: 30px !important;

    .ui-inputswitch-slider:before {
      background-color: #fff;
      border-radius: 50%;
    }
  }
  .ui-inputswitch-checked {
    background-color: #00a98d !important;
  }
  .ui-multiselect-filter-icon {
    top: 10px !important;
  }
  .ui-multiselect-header .ui-multiselect-close {
    top: 10px !important;
  }
  .ui-multiselect-header .ui-multiselect-filter-container {
    width: 80% !important;
  }
  .ui-table-scrollable-body::-webkit-scrollbar {
    background-color: #ccc;
    background-clip: content-box;
    width: 6px;
  }
  .ui-table-scrollable-body::-webkit-scrollbar-thumb {
    background-color: #00a98d;
  }
  .ui-messages .ui-messages-icon {
    position: relative;
    top: -12px;
  }
  .ui-messages .ui-messages-summary {
    position: relative;
    top: -12px;
  }
  .ui-table-scrollable-header-box {
    margin-right: 0 !important;
  }
  .ui-table .ui-table-tbody tr:nth-child(even) {
    background-color: #ecf2f8;
  }
  .ui-table .ui-table-thead > tr > th {
    background-color: #00354b;
    color: #fff;
  }
  .ui-table .ui-sortable-column .ui-sortable-column-icon {
    color: #fff;
  }
  // 影响单选、多选选中行样式
  // .ui-table .ui-table-tbody > tr:focus {
  //   background-color: #ededed;
  // }

  .ui-radiobutton .ui-radiobutton-box.ui-state-active {
    border-color: #fff;
  }

  .ui-paginator .ui-paginator-first,
  .ui-paginator .ui-paginator-prev,
  .ui-paginator .ui-paginator-next,
  .ui-paginator .ui-paginator-last {
    height: 1.6em;
    min-width: 1.6em;
    line-height: 1.6em;
    margin: 4px 2px;
  }
  .ui-paginator .ui-paginator-pages .ui-paginator-page {
    height: 1.6em;
    min-width: 1.6em;
    line-height: 1.6em;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin: 4px 2px;
  }
  .p-button:enabled:focus {
    color: #21903f;
  }
  .tb-operator-content .p-button {
    color: #305ac9;
    background: transparent;
  }
  .p-button-label {
    font-weight: 700;
  }
}
